package com.coocaa.cirrus.common.base.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author bijiahao
 * @date : 2025/4/16 14:41
 * @description
 */
@Data
@Accessors(chain = true)
public class BaseEntity implements Serializable {
    @Schema(description = "自增ID")
    @TableId(type = IdType.AUTO)
    private Integer id;
    @Schema(description = "0-无效删除，1-有效")
    private Integer flag;
    @Schema(description = "创建者")
    private String creator;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "创建时间")
    private Date createTime;
    @Schema(description = "更新人")
    private String changer;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "更新时间")
    private Date updateTime;
    @Schema(description = "上下架状态 1-启用 2-禁用")
    private Integer status;
}
